Skip to content

fix: revert blanket tar 7.5.21 bump, exclude GHSA-r292-9mhp-454m instead - #9553

Merged
mohd-kashif merged 1 commit into
masterfrom
kashif/cecho-2021-fix-beta-publish-tar-lerna
Aug 25, 2026
Merged

fix: revert blanket tar 7.5.21 bump, exclude GHSA-r292-9mhp-454m instead#9553
mohd-kashif merged 1 commit into
masterfrom
kashif/cecho-2021-fix-beta-publish-tar-lerna

Conversation

@mohd-kashif

Copy link
Copy Markdown
Contributor

Summary

  • The "Publish @bitgo-beta" workflow was failing at packDirectory with TypeError: Cannot read properties of undefined (reading 'create'), caused by 98b76a5's blanket root resolutions.tar: "7.5.21", which also overrode lerna's own exact tar@6.2.1 pin.
  • lerna's bundled dist/index.js interops with tar via CJS require("tar") expecting the 6.x export shape (module.exports = { create, extract, ... }); tar 7.x's different export shape leaves import_tar.default.create undefined at runtime.
  • This repo has repeated, established precedent for exactly this constraint in osv-scanner.toml ("lerna requires tar v6 ... forcing v7.x breaks lerna's packDirectory API ... our usage is archive PACKING only"), which 98b76a5 didn't follow for the new GHSA-r292-9mhp-454m advisory.
  • Reverts tar back to 6.2.1 (restoring the **/swarm-js/**/tar resolution too) and adds a new [[IgnoredVulns]] entry for GHSA-r292-9mhp-454m with the same reasoning as the other tar exclusions.

Fixes CECHO-2021.

Test plan

  • yarn install succeeds; node_modules/tar resolves back to 6.2.1
  • Reproduced lerna's exact packDirectory call (tar.create({ cwd, prefix: 'package/', portable: true, mtime, gzip: true }, files)) directly against the installed tar — succeeds and produces a valid .tgz
  • osv-scanner.toml is valid TOML with the new GHSA-r292-9mhp-454m entry
  • CI: confirm the "Publish @bitgo-beta" workflow completes past packDirectory

The blanket root resolution forced tar 7.5.21 onto every consumer,
including lerna's own exact pin of tar@6.2.1. lerna's bundled dist
code interops with tar via CJS require() expecting the 6.x export
shape (plain module.exports = { create, extract, ... }); tar 7.x's
different export shape leaves import_tar.default.create undefined,
breaking `lerna publish` at packDirectory.

Revert tar to 6.2.1 (restoring the swarm-js/tar resolution too) and
exclude the new advisory in osv-scanner.toml with the same
packing-only/lerna-packDirectory reasoning already used for the
other tar CVEs in this file.

TICKET: CECHO-2021
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

CECHO-2021

@mohd-kashif mohd-kashif self-assigned this Aug 24, 2026

@diksha190 diksha190 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.
Root cause checks out : tar@7.5.21's ESM/CJS export shape mismatch breaks lerna's CJS require("tar") interop in packDirectory, matching the same "lerna needs tar v6" constraint already established elsewhere in osv-scanner.toml.
Standalone repro of lerna's exact packDirectory call against tar@6.2.1 confirms it works.

@mohd-kashif
mohd-kashif merged commit e3cd214 into master Aug 25, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants